<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2019/11/21
 * Time: 11:50
 */
namespace App\HttpController\Api;

use EasySwoole\Component\Singleton;
use EasySwoole\Http\AbstractInterface\Controller;

class Base extends Controller
{

    function index()
    {
        return $this->writeJson(200, "ok", []);
    }

    public function onRequest(?string $action): ?bool
    {
        return true;
    }

    public function onException(\Throwable $throwable): void
    {
        throw $throwable;
    }

}